<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    window.onload = function () {
        alert("1")
    }
    window.onload = function () {
        alert("2")
    }
</script>
<script src="js/demo.js"></script>